package com.wangyb.wework.service.contact;

import com.ruoyi.common.core.page.IServicePlus;
import com.ruoyi.common.core.page.TableDataInfo;
import com.wangyb.wework.entity.contact.WwContact;
import com.wangyb.wework.entity.contact.WwContactQueryBo;
import com.wangyb.wework.entity.employee.WwEmployee;
import com.wangyb.wework.vo.WwContactVo;
import com.wangyb.wework.wxApi.ExternalContactResp;
import org.springframework.transaction.annotation.Transactional;

/**
 * 联系人（客户列）Service接口
 *
 * @Author: wangyb
 * @Date: 2021/6/30 6:22 下午
 */
public interface IWwContactService extends IServicePlus<WwContact> {
	/**
	 * 查询单个
	 * @return
	 */
	WwContactVo queryById(String id);

	/**
	 * 查询列表
	 */
	TableDataInfo<WwContactVo> queryPageList(WwContactQueryBo bo);


	@Transactional
	void syncContact(Long corpId);

    WwContactVo getContactVoByWxUserid(String wxUserId);

	WwContact getContactByWxUserid(String wxUserId);

	boolean restoreByWxUserid(String wxUserId);

	WwContact addContact(Long corpId, ExternalContactResp resp, String employeeWxUserid);

	void updateContact(Long corpId, ExternalContactResp resp, WwContact localContact, String employeeWxUserid);

	void delContactEmployeeByEmployee(Long corpId, WwContact contact, WwEmployee employee);

	void delContactEmployeeByContact(Long corpId, WwContact contact, WwEmployee employee);
}
